// 操作数据--获取请求的数据,然后调用 mutations内的方法实现数据的修改
import * as types from './mutations-types';
import {
    SET_APPOINT_REG_INFO, SET_AUTO_PREAPPOINT_REG_INFO, SET_BIZ_PARAMS_INFO,
    SET_CARD_TYPE_INFO, SET_CURRENT_SCHEDULE_INFO, SET_CURRENT_TIME_RANGE_INFO,
    SET_DATE_INFO,
    SET_DEPT_INFO,
    SET_DEPT_OPTIONS_INFO,
    SET_HOSP_AREA_INFO,
    SET_NUMBER_SCHEDULE_LIST_INFO,
    SET_OPTYPE_INFO,
    SET_PATIENT_INFO,
    SET_STEPS_INFO,
    SET_TAKE_NUMBER_INFO, SET_TIME_RANGE_LIST_INFO
} from "./mutations-types";
import {getAutoPreAppointReg, getDeptOptions, getOPTypeInfo, getTimeRangeList} from "@sc/DRCbiz/store/getters";

//获取模板的配置信息--所谓的节目信息
export const setBizOptionsInfo = async function ({commit, state}, data) {
    commit(types.SET_BIZ_OPTIONS_INFO, data);
};

export const setBizInfo = async function ({commit, state}, data) {
    commit(types.SET_BIZ_INFO, data);
};

// 到计时
export const setCTDTimeInfo = async function ({commit, state}, data) {
    commit(types.SET_CTD_TIME_INFO, data);
};


// 获取预约或者取号的请求汇总参数
export const setBizParams = async function ({commit, state}, data) {
    commit(types.SET_BIZ_PARAMS_INFO, data);
};

// 卡片信息
export const setCardTypeInfo = async function ({commit, state}, data) {
    commit(types.SET_CARD_TYPE_INFO, data);
};

// 患者信息
export const setPatientInfo = function ({commit, state}, data) {
    commit(types.SET_PATIENT_INFO, data);
};

// 允许取号的列表
export const setTakeNumberList = function ({commit, state}, data) {
    commit(types.SET_TAKE_NUMBER_INFO, data);
};

// 步距
export const setStepsInfo = function ({commit, state}, data) {
    commit(types.SET_STEPS_INFO, data);
};

export const setMessageInfo = function ({commit, state}, data) {
    commit(types.SET_MESSAGE_INFO, data);
};

// 待缴费明细
export const setWaitPayTheFees = function ({commit, state}, data) {
    commit(types.SET_WAIT_PayTHEFEES, data);
};

// 商品明细
export const setDrugInformationDetailsList = function ({commit, state}, data) {
    commit(types.SET_DRUG_INFORMATION_LIST, data);
};

// 项目清单
export const setItemList = function ({commit, state}, data) {
    commit(types.SET_ITEM_LIST, data);
};

// 住院患者信息
export const setInpatientInformation = function ({commit, state}, data) {
    commit(types.SET_INPATIENT_INFORMATION , data);
};

// 住院一日清单
export const setOneDayHospitalizationList = function ({commit, state}, data) {
    commit(types.SET_ONE_DAY_HOSPITALIZATION_LIST, data);
};

export const setOPTypeInfo = function ({commit, state}, data) {
    commit(types.SET_OPTYPE_INFO, data);
};


export const setDeptOptions = function ({commit, state}, data) {
    commit(types.SET_DEPT_OPTIONS_INFO, data);
};

export const setDrScheduleList = function ({commit, state}, data) {
    commit(types.SET_NUMBER_SCHEDULE_LIST_INFO, data);
};

export const setDeptInfo = function ({commit, state}, data) {
    commit(types.SET_DEPT_INFO, data);
};

export const setAppointRegInfo = function ({commit, state}, data) {
    commit(types.SET_APPOINT_REG_INFO, data);
};
export const setHospAreaInfo = function ({commit, state}, data) {
    commit(types.SET_HOSP_AREA_INFO, data);
};

export const setDateInfo = function ({commit, state}, data) {
    commit(types.SET_DATE_INFO, data);
};

// 自动预结算
export const setAutoPreAppointReg = function ({commit, state}, data) {
    commit(types.SET_AUTO_PREAPPOINT_REG_INFO, data);
};

export const setTimeRangeList = function ({commit, state}, data) {
    commit(types.SET_TIME_RANGE_LIST_INFO, data);
};

export const setCurrTimeRangeInfo = function ({commit, state}, data) {
    commit(types.SET_CURRENT_TIME_RANGE_INFO, data);
};

export const setCurrentScheduleInfo = function ({commit, state}, data) {
    commit(types.SET_CURRENT_SCHEDULE_INFO, data);
};